package com.example.service.impl;

import com.example.entity.UserInfo;
import com.example.service.LotteryServiceJdk;

public class LotteryServiceJdkImpl extends LotteryServiceJdk {
    @Override
    public UserInfo lottery(String uid) {
        String msg = null;
        if (uid.hashCode() % 2 == 0) {
            msg = "恭喜您,摇中了";
        } else {
            msg = "您没有摇中";
        }
        UserInfo userInfo = new UserInfo();
        userInfo.setUserName(uid);
        userInfo.setResult(msg);
        return userInfo;
    }
}
